<include file="Public:header" />
<load href="__PUBLIC__/Js/Ajax/ThinkAjax-1.js" />
<load href="__PUBLIC__/Js/UserJs.js" />
<script language='javascript'>
function CheckForm(){
	if(document.form1.ePoints.value==""){
		alert("金额不能为空！");
		return false;
	}
	if(document.form1.select.value==1){
		if(confirm('您确定把 '+document.form1.ePoints.value+' 转借给会员（'+document.form1.UserID.value+'）吗？'))
		{
			return true;
		}else{
			alert('您取消了本次操作');
			return false;
		}
	}
}

function yhServer(Ful){
	str = $F(Ful).replace(/^\s+|\s+$/g,"");
	ThinkAjax.send('__APP__/Fck/check_CCuser/','ajax=1&userid='+str,'',Ful+'1');
}
</script>
<div class="ncenter_box">
<div class="accounttitle"><h1>货币转账 </h1></div>
    <form name="form1" method="post" action="__URL__/transferMoneyAC" onSubmit="{return CheckForm();}">
      <table width="100%" border="0" cellpadding="3" cellspacing="0">
          <tr>
            <td height="30" align="right" width="30%">奖金币：</td>
            <td colspan="2"><span style="color: grey">{$rs.agent_use}</span></td>
          </tr>
          <tr>
            <td height="30" align="right" width="30%">消费币： </td>
            <td colspan="2"><span style="color: grey">{$rs.agent_cash}</span></td>
          </tr>
          <tr>
            <td height="30" align="right">类型：</td>
            <td colspan="2">
            <select name="select" id="select" onchange="Selev(this.value)" onpropertychange="Selev(this.value)">
              <!--<option value="1"> 积分 转给 其他会员 </option>-->
                <option value="2"> 奖金币 转 消费币 </option>
            </select>
            </td>
          </tr>
          <!--<tr id="Selev">-->
            <!--<td height="30" align="right" width="30%">{$User_namex}：</td>-->
            <!--<td width="15%"><input name="UserID" type="text" id="UserID" class="ipt" onblur="javascript:yhServer(this.name);getUserName(this.value)" onfocus="notice('0','')" /></td>-->
            <!--<td width="55%"><div id="UserID1" class="info"><div id="0" class="focus_r" style="display:none;"><div class="msg_tip">请输入你要转给会员的编号。</div></div></div></td>-->
          <!--</tr>-->
		  
		  <tr style="display:none;">
            <td height="30" align="right">开户姓名：</td>
            <td colspan="2"><input name="UserName" type="text" id="UserName" class="ipt" value="" readonly="readonly"/></td>
          </tr>
          <tr>
              <td height="30" align="right">比例：</td>
              <td colspan="2">1：1.2</td>
          </tr>
          <tr>
              <td height="30" align="right">转账金额：</td>
              <td  colspan="2"><input name="ePoints" type="text" id="ePoints" class="ipt" onkeyup="javascript:Null_Int(this.name);" onfocus="notice('1','')"  onblur="notice('1','none')"/></td>
              <!--<td><div id="ePoints1" class="info"><div id="1" class="focus_r" style="display:none;"><div class="msg_tip">请输入转换额度。</div></div></div></td>-->
          </tr>
          <tr>
            <td height="30" align="right">二级密码：</td>
            <td  colspan="2"><input name="PassWord" type="password" id="PassWord" class="ipt" value="" onfocus="notice('2','')"  onblur="notice('2','none')"/></td>
            <!--<td width="55%"><div id="PassWord1" class="info"><div id="2" class="focus_r" style="display:none;"><div class="msg_tip">请输入你的二级密码。</div></div></div></td>-->
          </tr>

          <tr>
            <td height="30">&nbsp;</td>
            <td colspan="2"><input type="submit" name="Submit" value="确定" class="button_text" style="background: #f0ad4e;padding: 2px 10px;border-radius: 3px;color: #fff;"/></td>
          </tr>
         
      </table>
      </form>
<br>
<table width="100%" class="tab3" border="0" cellpadding="3" cellspacing="1" id="tb1" bgcolor="#b9c8d0">
	<thead>
		<tr>
			<!--<th><span>转出{$User_namex}</span></th>-->
			<!--<th><span>转入{$User_namex}</span></th>-->
			<th><span>会员</span></th>
			<th><span>时间</span></th>
			<th><span>奖金币</span></th>
			<th><span>消费币</span></th>
            <th><span>类型</span></th>
            <!--<th><span>说明</span></th>-->
		</tr>
	</thead>
    <volist name='list' id='vo'>
	<tr align="center">
		<td>{$vo['out_userid']}</td>
		<td>{$vo['rdt']|date='Y-m-d H:i:s',###}</td>
		<td>-{$vo['epoint']}</td>
		<td>{$vo['jifen']}</td>
        <td>
        	<eq name="vo['type']" value="2">转账</eq>
        	<!--<eq name="vo['type']" value="3">信用积分 转 消费积分</eq>-->
        	<!--<eq name="vo['type']" value="4">购股积分 转 信用积分</eq>-->
        </td>
	</tr>
    </volist>
</table>
<table width="100%" class="tab3_bottom" border="0" cellpadding="0" cellspacing="1">
    <tr>
        <td align="center">{$page}</td>
    </tr>
</table>
</div>

<script language="javascript">
function Selev(o){
	if(o==2||o==3||o==4||o==5||o==6){document.getElementById('Selev').style.display = 'none';}
    if(o==1){document.getElementById('Selev').style.display = '';}

}
new TableSorter("tb1");

function getUserName(vv){
    var xmlHttp;
		try{
			//FF Opear 8.0+ Safair
			xmlHttp=new XMLHttpRequest();
		}
		catch(e){
			try{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				alert("您的浏览器不支持AJAX");
				return false;    
			}
		}
		xmlHttp.onreadystatechange=function(){
			if(xmlHttp.readyState==4){
				var valuet = xmlHttp.responseText;
				
				document.getElementById("UserName").value=valuet;
				
			}
		}
		var url="__URL__/getUserName";
		url+="/userid/"+vv+"/"+Math.random();
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	

}

</script>

<include file="Public:footer" />
